Skip to content

feat!: align hot-path session memory with context-mode#2

Merged
vicary merged 39 commits into
mainfrom
feat/context-overhaul-hot-tier
Mar 25, 2026
Merged

feat!: align hot-path session memory with context-mode#2
vicary merged 39 commits into
mainfrom
feat/context-overhaul-hot-tier

Conversation

@vicary

@vicary vicary commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • re-center the branch on an MCP-first session_* runtime, with in-process bounded execution, file processing, local indexing/search, and per-root-session corpus storage on Redis/FalkorDB
  • keep session continuity and long-term memory split correctly: plugin hooks own canonical root-session resolution, event capture, <session_memory> injection, and native-tool enforcement, while Graphiti stays asynchronous and off the hot path
  • harden runtime lifecycle and session-state behavior with shared teardown, temporary-root to canonical-root migration, bounded artifact/corpus overflow handling, and follow-up docs/config cleanup

Key Changes

  • register an in-process session_* MCP surface from the plugin runtime: session_execute, session_execute_file, session_batch_execute, session_index, session_search, session_fetch_and_index, session_stats, and session_doctor
  • add the local session corpus layer for normalized indexing, bounded search/snippet retrieval, fetched-content ingestion, artifact storage, and per-root-session stats in Redis/FalkorDB
  • route large or risky work toward the MCP-first path via tool.execute.before / tool.execute.after, including native-tool guidance, argument rewriting, denial paths, and routing outcome metadata
  • preserve shared session state across parent/child and temporary/canonical root transitions by wiring runtime-state migration through SessionManager, the session MCP runtime, and corpus storage
  • retain the Redis-backed short-term memory + async Graphiti model: hot-path injection remains local/cache-backed, while Graphiti drain and cache refresh stay background-only
  • refresh README/plans/tests to describe the MCP-first architecture, local-first injection semantics, Graphiti-optional behavior, and current validation surface
  • update release workflow behavior in .github/workflows/publish.yml and .github/scripts/version.ts so publish gating, skip behavior, and tag/release creation stay consistent and idempotent even when npm publish is skipped

Testing

  • add and expand focused Deno coverage for the MCP runtime, corpus, routing, runtime teardown, session migration, and hook integration paths
  • covered suites now include src/services/session-mcp-runtime.test.ts, src/services/session-corpus.test.ts, src/services/tool-routing.test.ts, src/services/tool-guidance-cache.test.ts, src/services/tool-routing-outcome-cache.test.ts, src/handlers/tool-before.test.ts, src/handlers/tool-after.test.ts, src/session.test.ts, and related index/handler/service tests
  • release/versioning coverage includes .github/scripts/version.test.ts

Notes

  • this PR is no longer just the original Redis hot-tier rewrite; it now reflects the follow-up MCP-first replacement work and the later hardening passes on runtime lifecycle, corpus behavior, root-session migration, and release workflow handling
  • current docs intentionally describe hooks as enforcement/continuity plumbing, not the primary execution surface; the primary path is the in-process session_* MCP runtime

cursor[bot]

This comment was marked as off-topic.

@vicary vicary changed the title feat: move session memory to Redis hot tier feat!: mark context overhaul as 0.2.0 release Mar 14, 2026
@vicary vicary changed the title feat!: mark context overhaul as 0.2.0 release feat!: move session memory to Redis hot tier Mar 14, 2026
@vicary vicary changed the title feat!: move session memory to Redis hot tier feat!: align hot-path session memory with context-mode Mar 14, 2026
@vicary vicary requested a review from Copilot March 14, 2026 19:51

This comment was marked as outdated.

This comment was marked as outdated.

@vicary vicary requested a review from Copilot March 15, 2026 11:33

This comment was marked as outdated.

@vicary vicary requested a review from Copilot March 17, 2026 04:42
Repository owner deleted a comment from cursor Bot Mar 17, 2026

This comment was marked as resolved.

@vicary vicary force-pushed the feat/context-overhaul-hot-tier branch 2 times, most recently from 7a9bcb3 to 8561dbe Compare March 18, 2026 07:21
@vicary vicary requested a review from Copilot March 19, 2026 02:26

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 19, 2026 05:00

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 19, 2026 05:24

This comment was marked as resolved.

vicary

This comment was marked as resolved.

vicary

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 19, 2026 06:57

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 19, 2026 07:44

This comment was marked as outdated.

@vicary vicary requested a review from Copilot March 24, 2026 10:03

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 10:33

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 10:49

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 11:15

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 13:09

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 14:09

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 17:53

This comment was marked as off-topic.

@vicary vicary requested a review from Copilot March 24, 2026 18:02

This comment was marked as resolved.

@vicary vicary requested a review from Copilot March 24, 2026 20:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 101 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/config.ts:1

  • coerceConfiguredUrl returns url.toString(), which normalizes URLs by adding a trailing / path when none is present (e.g. redis://host:6379 becomes redis://host:6379/). This is an observable behavior change that can break downstream parsing if any caller expects the original URL string format. Consider preserving the original candidate when it already has an explicit scheme (and is valid), or stripping the default / path when the input did not include one.
import os from "node:os";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vicary vicary merged commit ffc806e into main Mar 25, 2026
1 check passed
@vicary vicary deleted the feat/context-overhaul-hot-tier branch March 25, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants